package com.yl.chainStore.services

import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.yl.chainStore.common.enums.Status
import com.yl.chainStore.entity.customer.CustomerInfo
import com.yl.chainStore.entity.sick.CustomerSubscribeLog
import com.yl.chainStore.entity.sick.SickCustomerAccessLog
import com.yl.chainStore.entity.sick.SickMedicalRecordsDetail
import com.yl.chainStore.entity.user.CompanyUserCustomerSelectLog
import com.yl.chainStore.entity.user.CompanyUserMedicalHistoryModelType
import com.yl.chainStore.entity.warehouse.*
import com.yl.chainStore.pojo.vo.customer.CustomerSelectVo
import com.yl.chainStore.pojo.vo.sick.CustomerSubscribeLogSelectVo
import com.yl.chainStore.pojo.vo.sick.SickCustomerAccessLogSelectVo
import com.yl.chainStore.pojo.vo.sick.SickMedicalRecordsDetailSelectVo
import com.yl.chainStore.pojo.vo.user.CompanyUserCustomerSelectLogSelectVo
import com.yl.chainStore.pojo.vo.user.CompanyUserOperationLogSelectVo
import com.yl.chainStore.pojo.vo.user.RegisteredUserResult
import com.yl.common.control.ResponseBody
import com.yl.users.common.enum.UserPackageTypeEnum
import com.yl.users.entity.CompanyUser

/**
 * 用户操作
 */
interface IWebCompanyUserService {

	/**
	 * 暂存一张入库单
	 */
	fun stagingInOrder(inOrder:WarehouseInOrder): ResponseBody

	/**
	 * 获取暂存的入库单
	 */
	fun getStagingInOrder(userId:Long,warehouseId:Long):WarehouseInOrder?

	/**
	 * 暂存一张出库单
	 */
	fun stagingOutOrder(outOrder:WarehouseOutOrder): ResponseBody

	/**
	 * 获取暂存的出库单
	 */
	fun getStagingOutOrder(userId:Long,warehouseId:Long):WarehouseOutOrder?

	/**
	 * 暂存一张调度单
	 */
	fun stagingDispatchOrder(dispatchOrder: WarehouseDispatchOrder): ResponseBody

	/**
	 * 获取暂存的调度单
	 */
	fun getStagingDispatchOrder(userId:Long,warehouseId:Long):WarehouseDispatchOrder?

	/**
	 * 暂存一张调度单
	 */
	fun stagingCheckOrder(checkOrder: WarehouseCheckOrder): ResponseBody

	/**
	 * 获取暂存的调度单
	 */
	fun getStagingCheckOrder(userId:Long,warehouseId:Long):WarehouseCheckOrder?

	/**
	 * 暂存一张损益单
	 */
	fun stagingPlOrder(order: WarehouseProfitLossOrder): ResponseBody

	/**
	 * 获取暂存的损益单单
	 */
	fun getStagingPlOrder(userId:Long,warehouseId:Long):WarehouseProfitLossOrder?

	/**
	 * 我的患者(包含下属的)
	 */
	fun getSelfCustomerPage(page:Page<CustomerInfo>,vo:CustomerSelectVo):Page<CustomerInfo>
	/**
	 * 从用户这边获取预约列表
	 *
	 */
	fun getSubscribeLogList(vo: CustomerSubscribeLogSelectVo): List<CustomerSubscribeLog>

	/**
	 * 从用户这边获取预约列表
	 *
	 */
	fun getSubscribeLogPage(vo: CustomerSubscribeLogSelectVo): Page<CustomerSubscribeLog>

	/**
	 * 获取预约列表按日期处理（用户本身的）
	 */
	fun getSubScribeListByDate(userId: Long,vo: CustomerSubscribeLogSelectVo): MutableList<MutableList<CustomerSubscribeLog>>

	/**
	 * 获取预约列表按日期处理（用户本身的）
	 */
	fun getSubScribeListByDate(user: CompanyUser, vo: CustomerSubscribeLogSelectVo): MutableList<MutableList<CustomerSubscribeLog>>

	/**
	 * 今日新增预约数量
	 */
	fun getTodayNewAddSubCount(userId: Long):Int
	/**
	 * 获取用户状态
	 */
	fun getUserStatusResult(user: CompanyUser,userType: UserPackageTypeEnum): RegisteredUserResult

	/**
	 * 查询自己的今日就诊（医生，护士用）
	 */
	fun getRecordDetailPage(userId:Long,page:Page<SickMedicalRecordsDetail>,vo: SickMedicalRecordsDetailSelectVo):Page<SickMedicalRecordsDetail>


	/**
	 * 查询用  添加查询的客户记录
	 */
	fun addSelectCustomerLog(selectLog:CompanyUserCustomerSelectLog)
			:ResponseBody

	/**
	 * 查询用 查询的客户记录
	 */
	fun getSelectCustomerLogPage(
	                            vo : CompanyUserCustomerSelectLogSelectVo)
	:Page<CompanyUserCustomerSelectLog>

	/**
	 * 删除记录
	 */
	fun deleteSelectCustomerLog(userId: Long?,customerId:Long?):ResponseBody


	/**
	 * 今日回访数量
	 */
	fun getVisitCountToday(userId: Long):Int

	/**
	 * 按条件查询修改日志数量
	 */
	fun getUpdateLogCountByVo(vo: CompanyUserOperationLogSelectVo):Int

	/**
	 * 查询用户执行的随访记录列表
	 */
	fun getFollowLogList(userId:Long,vo: SickCustomerAccessLogSelectVo):List<SickCustomerAccessLog>

	/**
	 * 查询用户执行的随访记录分页
	 */
	fun getFollowLogPage(userId:Long,vo: SickCustomerAccessLogSelectVo):Page<SickCustomerAccessLog>

}
